package com.eorchis.module.trainingclass.job;

import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.context.ApplicationContext;

import com.eorchis.core.log4j.ILog4jManager;
import com.eorchis.module.schedule.BaseJob;
import com.eorchis.module.schedule.annotation.Job;
import com.eorchis.module.trainingclass.service.impl.TrainingClassServiceImpl;
import com.eorchis.module.trainingclass.ui.commond.TrainingClassQueryCommond;

/**
 * Title: UpdateTrainClassState<br>
 * Description: 更新开班状态和分配学员学时job<br>
 * Company: GOLDGOV<br>
 * Copyright @ 2013 ORCHIS .All rights reserved.<br>
 * @author Max
 * @createDate 2013-12-25
 * @version $Revision:$
 */
@Job(value="jieban")
public class UpdateTrainClassState extends BaseJob{
	// 培训班信息接口

	
	
	@Override
	protected void executeJob(JobExecutionContext arg0, ApplicationContext arg1)
			throws JobExecutionException {
		
		TrainingClassServiceImpl trainingClassService = (TrainingClassServiceImpl) arg1.getBean("com.eorchis.module.trainingclass.service.impl.TrainingClassServiceImpl");
		// 记录日志
		ILog4jManager log4jManager = (ILog4jManager) arg1.getBean("com.eorchis.core.log4j.impl.Log4jManager");
		log4jManager.debugCustomLog("com.eorchis.module.trainingclass.job.UpdateTrainClassState", "execute", "修改开班状态和修改学员学时");
		try {
			TrainingClassQueryCommond commond=new TrainingClassQueryCommond ();
			trainingClassService.updateThematicClassOpenStateQuartz(commond);
		} catch (Exception e) {
			e.printStackTrace();
		}
		log4jManager.debugCustomLog("com.eorchis.module.trainingclass.job.UpdateTrainClassState", "execute", "修改开班状态和修改学员学时");
		
	}

}
